package com.groupmobile.quotes;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;
import android.widget.Toast;

/**
 * 
 * @author DanhHieu show dashboard screen
 */
public class MainActivity extends Activity implements OnClickListener {
	ImageButton quotes_btn, d_authors_btn;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.dashboard);
		quotes_btn = (ImageButton) findViewById(R.id.d_quotes_btn);
		quotes_btn.setOnClickListener(this);
		
		d_authors_btn = (ImageButton) findViewById(R.id.d_authors_btn);
		d_authors_btn.setOnClickListener(this);

	}

	public void onClick(View v) {
		// TODO Auto-generated method stub
		switch (v.getId()) {
		case R.id.d_quotes_btn:
			Toast.makeText(getApplicationContext(), "quotes", Toast.LENGTH_LONG)
					.show();
			Intent intent = new Intent(MainActivity.this,
					FullQuotesIndext.class);
			startActivity(intent);
			break;
		case R.id.d_authors_btn: 
			Toast.makeText(getApplicationContext(), "AuthorIndex", Toast.LENGTH_LONG)
			.show();
			Intent intent_author_index = new Intent(MainActivity.this,AuthorIndex.class);
			startActivity(intent_author_index);
			break;
		default:
			break;
		}
	}

}
